package com.aabte.design.pattern.behavioral.strategy;

import org.apache.commons.lang3.StringUtils;

public class Test1 {

    public static void main(String[] args) {

        PromotionActivity promotionActivity618 = new PromotionActivity(new LiJianPromotionStrategy());

        PromotionActivity promotionActivity1111 = new PromotionActivity(new FanXianPromotionStrategy());

        PromotionActivity promotionActivity1212 = new PromotionActivity(new ManjianPromotionStrategy());

        promotionActivity618.executePromotionStrategy();
        promotionActivity1111.executePromotionStrategy();
        promotionActivity1212.executePromotionStrategy();

        /*
        立减促销
        返现促销
        满减促销
         */


        PromotionActivity promotionActivity = null;
        String promotionKey = "LIJIAN";
        if (StringUtils.equals(promotionKey, "LIJIAN")){
            promotionActivity = new PromotionActivity(new LiJianPromotionStrategy());
        } else if (StringUtils.equals(promotionKey, "MANJIAN")) {
            promotionActivity = new PromotionActivity(new ManjianPromotionStrategy());
        }


    }

}
